function Remote(boxee_action) {
    var hostvalue = "192.168.1.100";
    var portvalue = "8800";
    var url = "http://" + hostvalue + ":" + portvalue + "/xbmcCmds/xbmcHttp?command=" + boxee_action;
    var request = new XMLHttpRequest();
    request.open("GET", url);
    request.send(null);
}

function get_volume() {
var volume = Remote("GetVolume()");
return volume;
}

function set_volume(volume) {
Remote("SetVolume(" + volume + ")");
}

function get_progress () {
var progress = Remote("GetPercentage");
return progress;
}

function set_progress (progress) {
Remote("seekpercentage(" + progress + ")");
}

function stop() {
Remote("stop")
}

function mute() {
Remote("mute");
}

function play() {
Remote("pause");
}

function back_button() {
Remote("SendKey(275)");
}

function up_button() {
Remote('SendKey(270)');
    }

function down_button() {
Remote('SendKey(271)');
    }

function right_button() {
Remote('SendKey(273)');
    }

function left_button() {
Remote('SendKey(272)');
    }

function enter_button() {
Remote('SendKey(256)');
}

function rewind_button() {
Remote('SeekPercentageRelative(-5)');
}

function ff_button() {
Remote('SeekPercentageRelative(+5)');
}

var volume = getvolume()
var percent = getpercent()